<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="/wondershare/js/jquery.js"></script> 
<script src="/wondershare/js/utils.js"></script> 
<script src="/wondershare/js/topic.js"></script> 
<link href="/wondershare/styles/main.css" rel="stylesheet" type="text/css" />
<link href="/wondershare/styles/general.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//note 排序
function _sort( field ){
	$("#sortby").val( field );
	if( $("#sort").val() == 'ASC' ) $("#sort").val('DESC'); else $("#sort").val('ASC');
	$("#myform").submit();
}
//note 生成HTML
function createHtml( table, field_id, key_id ){
	$("#create_tip_"+key_id).html( '正在生成...' );
	$.get('../bin/docList_'+table+'.php?action=pub&TID='+table+'&field_id='+field_id+'&key_id='+key_id+'&ajax_pub=1',function(data){
		if( parseInt(data) == 1 ){
			$("#create_tip_"+key_id).html( '生成成功' );
		}else if( data == 'empty' ){
			document.location.href = '../bin/doc_'+table+'.php?field_id='+field_id+'&key_id='+key_id;
		}else{
			$("#create_tip_"+key_id).html( '生成失败' );
		}
	});
}
</script>
</head>

<body >
<h1>
<span class="action-span">
<a href="?action=site_search&w_type=<{$w_type}>">整站搜索替换</a>
</span>
<{if $del_list == 0}> 

<span class="action-span">
<a href="/wondershare/article.php?action=index&del_list=1&w_type=<{$w_type}>">文章回收站</a>
</span>
	<{if $w_type == 1}>
	<span class="action-span">
	<a href="/wondershare/create_video_xml.php?action=ws_xml">ws生成视频xml</a>
	</span>
	<{elseif $w_type == 8}>
     <span class="action-span">
	<a href="/wondershare/create_video_xml.php?action=is_xml">is生成视频xml</a>
	</span>
	<{elseif $w_type == 2}>
     <span class="action-span">
	<a href="/wondershare/create_video_xml.php?action=am_xml">am生成视频xml</a>
	</span>
	<{elseif $w_type == 4}>
     <span class="action-span">
	<a href="/wondershare/create_video_xml.php?action=app_xml">app生成视频xml</a>
	</span>
	<{else}>
	<{/if}>
	
	<{if $w_type == 5}>
	<span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=ws_j">同步JP网站预览</a>
	</span>
	<{elseif $w_type == 6}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=ws_d">同步DE网站预览</a>
	</span>
	<{elseif $w_type == 3}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=any">同步ANY网站预览</a>
	</span>
	<{elseif $w_type == 4}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=app">同步APP网站预览</a>
	</span>
	<{elseif $w_type == 2}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=aim">同步AIM网站预览</a>
	</span>
	<{elseif $w_type == 8}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=is">同步IS网站预览</a>
	</span>
	<{elseif $w_type == 7}>
     <span class="action-span">
	<a href="/wondershare/syn_template.php?action=preview&type=sp">同步SP网站预览</a>
	</span>
	<{else}>
	<{/if}>
    <span class="action-span">
	<a href="/wondershare/article.php?action=index&act=add&w_type=<{$w_type}>">添加文章</a>
	</span>
<{else}>
<span class="action-span">
<a href="/wondershare/article.php?action=index&w_type=<{$w_type}>"> 文章列表</a>
</span>
<{/if}>
<{if $w_type == 1}>
<span class="action-span1">
<a href="/wondershare/products.php?action=index">WS.COM网站产品信息</a> >
</span>
<{/if}>
<span id="search_id" class="action-span1">  <{if $del_list == 0}> <{$web_info}>网站文章列表<{else}><{$web_info}>网站文章回车站 <{/if}> </span>
<div style="clear:both"></div>
</h1>


<form id="myform" name="myform" method="POST" action="/wondershare/article.php?action=index&w_type=<{$w_type}>">

    <img height="22" border="0" width="26" alt="SEARCH" src="images/icon_search.gif">
        <!-- 分类 -->
    主分类：<select name="cat_id" style="width:130px;"><option value="0">所有分类</option>
	<{$cat_select}>
	</select>
    <!-- 推荐 -->
    推荐否：<select name="is_recommend"><option value="0" <{if $is_recommend == 0}> selected="selected" <{/if}> >全部</option>
	<option value="1" <{if $is_recommend == 1}> selected="selected" <{/if}> >推荐</option>
	<option value="2" <{if $is_recommend == 2}> selected="selected" <{/if}> > 未推荐</option></select>     
     <!-- 热门 -->
     热门否： <select name="is_hot">
	 <option value="0" <{if $is_hot == 0}> selected="selected" <{/if}> >全部</option>
	 <option value="1" <{if $is_hot == 1}> selected="selected" <{/if}> >热门文章</option>
	 <option value="2" <{if $is_hot == 2}> selected="selected" <{/if}> >一般文章</option></select>
            <!-- 上架 -->
     <!-- <select name="is_delete"><option value="">全部</option><option value="1">删除</option><option value="2">未删除</option></select>-->
        <!-- 关键字 -->
    ID：<input type="text" size="5" name="ar_id" value="<{$ar_id}>">
    标题：<input type="text" size="25" name="ar_title" value="<{$ar_title|escape}>">
    修改人：<select name="update_user" style="width:60px;">
    <option value="">所有</option>
    <{foreach from=$update_user item=v}>
    <option value="<{$v}>" <{if $user == $v}>selected="selected"<{/if}> ><{$v}></option>
    <{/foreach}>
    </select>
    生成状态：<select name="pub_status" style="width:80px;">
    	<option value="0">全部</option>
        <option value="1" <{if $pub_status == 1}>selected="selected"<{/if}>>已生成html</option>
        <option value="2" <{if $pub_status == 2}>selected="selected"<{/if}>>未生成html</option>
    </select>
	<input type="hidden" name="tag_id" value="<{$tag_id}>" />
	<input type="hidden" name="del_list" value="<{$del_list}>" />
    <input type="submit" class="button" name="search" value=" 搜索 ">
    <input type="hidden" name="sortby" id="sortby" value="<{$sortby}>" />
    <input type="hidden" name="sort" id="sort" value="<{$sort}>"/>
    <input type="hidden" name="w_type" id="w_type" value="<{$w_type}>" />
</form>

<table width="100%" cellspacing="1" cellpadding="2" id="list-table" class="list-div">
<tbody>
  <tr>
    <th align="center" width="66">ID</th>
    <th>文章标题</th>
	<th>是否有图</th>
	<th>推荐</th>
	<th>点击数量</th>
	<th>热门</th>
	<!--<th><a href="javascript:_sort('add_user');">作者</a><{if $sortby == 'add_user' }><img src="../images/<{if $sort == 'DESC'}>down<{else}>up<{/if}>.gif" /><{/if}></th>-->
    <th>作者<{if $sortby == 'author_id' }><img src="../images/<{if $sort == 'DESC'}>down<{else}>up<{/if}>.gif" /><{/if}></th>
	<th><a href="javascript:_sort('update_user');">修改人</a><{if $sortby == 'update_user' }><img src="../images/<{if $sort == 'DESC'}>down<{else}>up<{/if}>.gif" /><{/if}></th>	
    <th width="110"><a href="javascript:_sort('update_time');">修改时间</a><{if $sortby == 'update_time' }><img src="../images/<{if $sort == 'DESC'}>down<{else}>up<{/if}>.gif" /><{/if}></th>
	<!--<th width="70">生成时间</th>-->
	<th>生成状态</th>	
	<th>预览</th>
    <th>操作</th>
  </tr>
  <{foreach from=$art_info item=art}>
  <tr align="center" id="tr_<{$art.ar_id}>">
    <td align="center">
    <input value="<{$art.ar_id}>" name="ID[]" type="checkbox" > 
	 <{$art.ar_id}> </td>
	
	<td align="left" style="padding-left:10px;" id="td_title_<{$art.ar_id}>">
	<span onmouseout='check_css("title_<{$art.ar_id}>",0);' onmouseover='check_css("title_<{$art.ar_id}>",1);'      
	onclick='check_info(<{$w_type}>,"<{$art.ar_id}>","title_<{$art.ar_id}>","td_title_<{$art.ar_id}>","300","ar_title");' id="title_<{$art.ar_id}>" ><{$art.ar_title|escape}></span>
	</td>
	
	
    <td align="center">
	<{if $art.ar_image !=''}>有<{else}> 无
	 <{/if}> 
	</td>
	
	<td align="center">
	<img id="recommend_<{$art.ar_id}>" onclick="change_image('recommend_<{$art.ar_id}>',<{$art.ar_id}>,'recommend')" <{if $art.is_recommend == 1}> src="/wondershare/images/yes.gif" <{else}> 
	src="/wondershare/images/no.gif" <{/if}> />
	</td>
	
	
	<td align="center" id="td_count_<{$art.ar_id}>" > 
	<span onmouseout="check_css('count_<{$art.ar_id}>',0);" onmouseover="check_css('count_<{$art.ar_id}>',1);"      
	onclick="check_info(<{$w_type}>,'<{$art.ar_id}>','count_<{$art.ar_id}>','td_count_<{$art.ar_id}>','20','ar_count');"  id="count_<{$art.ar_id}>" ><{$art.click_count}></span>
	
	</td>
	
	<td align="center">
	<img id="hot_<{$art.ar_id}>" onclick="change_image('hot_<{$art.ar_id}>',<{$art.ar_id}>,'hot')" <{if $art.is_hot == 1}> src="/wondershare/images/yes.gif" <{else}> 
	src="/wondershare/images/no.gif" <{/if}> />
	</td>
	
	<!--<td width="9%" align="center">
	<img    id="delete_<{$art.ar_id}>"  onclick="change_image('delete_<{$art.ar_id}>',<{$art.ar_id}>,'delete')" <{if $art.is_delete == 1}> src="/wondershare/images/yes.gif" <{else}> 
	src="/wondershare/images/no.gif" <{/if}> />
	</td>-->
	<!--<td><{$art.add_user}></td>-->
    <td><{$art.author}></td>
	<td><{if $art.update_user == '' }> <{$art.add_user}> <{else}> <{$art.update_user}> <{/if}></td>
	<td><{if $art.update_time == '' }> <{$art.add_time}> <{else}> <{$art.update_time}> <{/if}></td>
	<!--<td><{$art.pub_time}></td>-->
	<td id="create_tip_<{$art.ar_id}>"><span style="color:#FF0000"><{if $art.pub_status == 1 }>已生成html<{/if}></span></td>
	<td><{if $art.template_url neq '' && $art.template_url neq '0' }> <a href="<{$art.template_url}>"  target="_blank" >预览</a> <{/if}></td>
    <td align="center">
	 <{if $del_list == 0}>
     <a href="#" onclick="delete_article(<{$art.ar_id}>,'in_delete','article')" >删除</a> | 
	<a href="/wondershare/article.php?action=index&act=edit&ar_id=<{$art.ar_id}>&w_type=<{$w_type}>" >编辑</a> | 
    <a href="<{if $art.pub_status == 1}>javascript:createHtml(<{$site_config.table}>,<{$site_config.field_id}>,<{$art.ar_id}>);<{else}>../bin/doc_<{$site_config.table}>.php?field_id=<{$site_config.field_id}>&key_id=<{$art.ar_id}><{/if}>">生成</a>
	<{else}>
	 <a href="#" onclick="delete_article(<{$art.ar_id}>,'in_delete','revert_article')" >还原</a> 
	<{/if}>
    </td>
  </tr>
  <{/foreach}>
  <tr> <td><input name="checkall" value="checked" onclick="v=document.getElementsByName('ID[]');if(this.checked){for(i=0;i<v.length;i++)v[i].checked=true;}else{for(i=0;i<v.length;i++)v[i].checked=false;}" type="checkbox">全选</td>

		
		<td colspan="12">&nbsp;&nbsp;<{if $del_list == 0}>
        	<input name="sub" value="删除" type="button" onclick="delete_article(0,'list','article');">
		<{else}>
        	<input name="sub" value="还原" type="button" onclick="delete_article(0,'list','revert_article');">
		<{/if}>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <{$page_url}> &nbsp;&nbsp;&nbsp; 共有 <span id="total"><{$total}> </span>条记录</td>
	</tr>
  </tbody>
</table>

</body>
</html>